﻿<%template _header%>
<%namespace YouHP.Model%>
<!--header end-->

<!--TheCurrent start-->
<div id="foruminfo">
	<div class="userinfo">
		<h2><a href="{Config.WebsiteUrl}/Index.aspx" class="home">{Config.WebsiteTitle}</a> <span><a href="{Config.WebsiteUrl}/Member/Manage.aspx">用户中心</a></span><strong>收件箱</strong></h2>	</div>
	<div class="forumstats">
		<div id="search">
				<%template _quicksearch%>
		</div>
	</div>
</div>
<!--TheCurrent end-->

<!--主体-->
<script type="text/javascript">
	function checkCheckBox(form,objtag)
	{
		if (typeof(objtag.checked) == "undefined")
		{
			objtag.checked = true;
		}
		for(var i = 0; i < form.elements.length; i++) 
		{
			var e = form.elements[i];
			if(e.name == "pmitemid") 
			{
				e.checked = objtag.checked;
			}
		}
		objtag.checked = !objtag.checked;
	}
</script>
<div class="controlpannel">
   <%template _memmenu%>
	<div class="pannelcontent">
		<div class="pcontent">
			<div class="panneldetail">
				<%template _mempmenu%>	
				<div class="pannelbody">
					<div class="pannellist">
					<%if ErrorCount==0%>
						<%if IsPost%>
							<%template _msgbox%>
						<%else%>
						<p class="newmessage"><a href="PostPm.aspx" class="submitbutton">写新消息</a></p>
				  		<form id="pmform" name="pmform" method="post" action="">
						<table width="100%" border="0" cellspacing="0" cellpadding="0" ID="Table1">
						<%csharp%>
						foreach(MessageInfo Pm in PmList)
						{
						<%/csharp%>
							<tbody>
							<tr class="messagetable" onmouseover="this.className='messagetableon'" onmouseout="this.className='messagetable'">
							<td width="3%"><img src="/support/dnt/images/message_{Pm.New}.gif" alt="短信息"/></td>
							<td width="4%"><input name="pmitemid" id="id{Pm.Pmid}" type="checkbox" value="{Pm.Pmid}" style="margin-top:-1px;"/></td>
							<td width="50%" style="text-align:left;"><a href="showPm.aspx?Pmid={Pm.Pmid}">{Pm.Subject}</a> </td>
							<td width="30%">
								<%csharp%>
								//aspxrewriteurl = this.UserInfoAspxRewrite({Pm.Msgfromid})
								string aspxrewriteurl = "";
							<%/csharp%>
								<a href="{aspxrewriteurl}" target="_blank">{Pm.Msgfrom}</a> &nbsp &nbsp &nbsp <span class="fontfamily">发送时间：{Pm.Postdatetime}</script></span></td>
							<td>
							    <a href="#" onclick="$('id{Pm.Pmid}').checked=true;$('pmform').submit();">删除</a></td>
							</tr>
							</tbody>
						<%csharp%>
						}
						<%/csharp%>
						</table>
						</form>
						</div>
						<div class="pannelmessage">
									<div class="pannelleft" style="width: 160px;">
										<a href="javascript:;"  onclick="checkCheckBox($('pmform'),this)" class="selectall">全选</a>&nbsp;&nbsp;&nbsp;
										<a href="#" onclick="$('pmform').submit()" class="selectall">删除</a> 
									</div>
									<div class="pannelright" style="width: 70%;">
											<table width="100%" border="0" cellspacing="0" cellpadding="0">
												<tbody>
													<tr>
														<th class="ticketleft">
															共有短消息:<span class="ticketnumbers">{UsedMsgCount}</span>条 上限: {MaxMsg}条
														</th>
														<td width="300">
															<div class="ticket-show" style="width:95%;">
																<div style="width:{usedmsgbarwidth}%;"></div>
															</div>
														</td>
													</tr>
												</tbody>
										 </table>
									</div>
						</div>
						<div class="forumpages">
  							<div class="forumpagesnumbers">
							<table border="0" cellpadding="0" cellspacing="0" ID="Table2">
								<tr>
									<td class="forumallpages"><strong>1</strong>/&nbsp;&nbsp;{PageCount}&nbsp;&nbsp;页</td>
									<td style="width:10px;">&nbsp;</td>
									<td class="forumallpages">{PageNumbers}</td>
									<td class="forumallpages3">跳转<input name="gopage" type="text" id="gopage" onKeyDown="if(event.keyCode==13) {
							window.location='PmInbox.aspx?page=' + this.value;}"  size="4" maxlength="9"  class="colorblue2"/>页</td>
								</tr>
							</table>
							</div>
						</div>
						<%/if%>
					<%else%>
					<%template _memerrmsgbox%>
					<%/if%>
			  </div>
			</div>
		</div>
	</div>
</div>
<!--主体-->
</div>
<%template _copyright%>
<%template _footer%>
